{% extends 'stark/layout.html' %}

{% block content %}

    <h2>考勤记录</h2>
    <br>

    <form method="post">
        {% csrf_token %}
        {{ m_form_set.management_form }}
        <div style="margin: 5px">
            <input type="submit" value="提交" class="btn btn-success">
        </div>

        <table class="table">
            <thead>
            <tr>
                <th>学生</th>
                <th>考勤</th>
            </tr>
            </thead>
            <tbody>
            {% for m_form in m_form_set %}
                <tr>
                    {{ m_form.id }}
                    <td>{{ m_form.instance.student }}</td>
                    <td>{{ m_form.record }}{{ m_form.record.errors.0 }}</td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </form>

{% endblock %}